package flyweightpattern;/*
 * @auther 顶风少年
 * @mail dfsn19970313@foxmail.com
 * @date 2019-08-02 21:52
 * @notify
 * @version 1.0
 */

import junit.framework.TestCase;

public class Client extends TestCase {
    public void testCreate(){
        FlyweightFactory flyweightFactory = new FlyweightFactory();
        Flyweight f1 = flyweightFactory.factory('A');
        f1.operation("张三");

        Flyweight f2 = flyweightFactory.factory('B');
        f2.operation("李斯特");

        Flyweight f3 = flyweightFactory.factory('A');
        f3.operation("张三丰");
    }
}
